package cn.cqie.attendance.manager.dao;

import cn.cqie.attendance.manager.pojo.AdminTeacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 697
 * @date 2021/6/16 11:00
 */
@Mapper
public interface AdminTeacherDao {

    /**
     * 模糊条件查询所有教师信息
     * @param teacher 教师
     * @return
     */
    List<AdminTeacher> queryAllTeacherInfo(@Param("teacher") AdminTeacher teacher);

    /**
     * 新增教师信息
     * @param teacher 教师
     * @return
     */
    int insertAllTeacherInfo(@Param("teacher") AdminTeacher teacher);

    /**
     * 根据教师工号查询老师数量信息
     * @param teacher
     * @return
     */
    int queryCountTeacherInfoByJobNumber(@Param("teacher") AdminTeacher teacher);


    /**
     * 根据教师ID修改教师信息
     * @param teacher 教师
     * @param id ID
     * @return
     */
    int updateTeacherById(@Param("teacher") AdminTeacher teacher, @Param("id")Integer id);



    /**
     * 根据教师ID停用教师
     * @param id
     * @return
     */
    int disableTeacherById(@Param("id")Integer id);


    /**
     * 根据教师ID启用教师
     * @param id
     * @return
     */
    int ableTeacherById(@Param("id")Integer id);


    /**
     * 根据教师id删除教师 可批量删除
     * @param teacherId
     * @return
     */
    int deleteTeacherById(@Param("teacherId")Integer teacherId);
}
